package action;

import java.util.NoSuchElementException;

import object.HomePage;
import object.LoginPage;

import org.openqa.selenium.WebDriver;




public class PageActions_Home {
	WebDriver driver;
	HomePage hp;

	public PageActions_Home(WebDriver driver)
	{
		this.driver = driver;
	}
	
	public void clickUserbar_login(){
			hp = new HomePage(driver);
			if (hp.gUserbar_login != null){
				try 
				{
					hp.gUserbar_login.click();
				} catch (NoSuchElementException e) {
					// TODO Auto-generated catch block
					System.out.println("Exception message"+ e.getMessage());
				}
			}
	}
	
	public void clickUserbar_logout(){
		hp = new HomePage(driver);
		if (hp.gUserbar_logout!= null){
			try 
			{
				hp.gUserbar_logout.click();
			} catch (NoSuchElementException e) {
				// TODO Auto-generated catch block
				System.out.println("Exception message"+ e.getMessage());
			}
		}
	}

	public void clickUserbar_MySpace(){
		hp = new HomePage(driver);
		if (hp.gUserbar_MySpace!= null){
			try 
			{
				hp.gUserbar_MySpace.click();
			} catch (NoSuchElementException e) {
				// TODO Auto-generated catch block
				System.out.println("Exception message"+ e.getMessage());
			}
		}
	}
}
